<?php
include "inc/user_functions.inc.php";
/* cookies here */

$typed = $_POST["current_password"];
$new_pass = $_POST["new_password"];
$new_pass_conf = $_POST["password_conf"];

$cus_id = 2;
$cur_password = get_password($cus_id);

if ($typed == $cur_password)
  {
    if ($new_pass != $new_pass_conf)
      {
	echo "Password mismatch";
	return 1;
      }
    echo "Password changed";
    set_password($cus_id, $new_pass);
  }
else
  echo "Intrusion detected!";

?>